<?php

namespace app\common\activity;

/**
 * 余额充值活动
 */
class Balance extends Base
{
	//充值活动
	public function activity(...$args) {
		$balance = $args[0];

		$loader = loader();
		$model = $loader->loadModel('ActivityBalance');
		$loader->loadAny('search', 'ActivityBalance')->current($model, $balance);
		$row = $model->find();
		if($row) {
			$balance += $row['gift'];
		}
        return $balance;
	}
}
